home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Washington_1988 / DevCon88.1 / JimmDemos / DemoSource / awindow.c next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  734 b   |  29 lines

  1. /* awindow.c -- get pointer to active window
  2.  * Copyright (c) 1988, I and I Computing and Commodore-Amiga, Inc.
  3.  *
  4.  * Executables based on this information may be used in software
  5.  * for Commodore Amiga computers.  All other rights reserved.
  6.  *
  7.  * This information is provided "as is"; no warranties are made.
  8.  * All use is at your own risk, and no liability or responsibility is assumed.
  9.  */
  10.  
  11. #include "sysall.h"
  12.  
  13. struct Window *
  14. AWindow()
  15. {
  16.     struct IntuitionBase    *ibase;
  17.     struct Window             *awindow;
  18.  
  19.     ibase = (struct IntuitionBase *) OpenLibrary("intuition.library", 32L);
  20.     if (!ibase) return (NULL);
  21.  
  22.     /* note that this is a public field of Intuition */
  23.     awindow = ibase->ActiveWindow;
  24.  
  25.     CloseLibrary(ibase);
  26.  
  27.     return (awindow);
  28. }
  29.